package com.bd.rj.backstage.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bd.rj.common.entity.Enterprise;
import org.apache.ibatis.annotations.Param;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 白世俊
 * @since 2025-01-03
 */
public interface IEnterpriseService extends IService<Enterprise> {
    public IPage<Enterprise> getEnterpriseByPage(int pageNum, QueryWrapper<Enterprise> queryWrapper);

    public IPage<Map<String,Object>> getEnterpriseByConditionAndPage(int pageNum,int pageSize,Enterprise enterprise);
    public void insertEnterpriseRecord(Map<String, Object> map);

    public List<Map<String, Object>> getIndustries();
    public  List<Map<String, Object>> buildHierarchy(List<Map<String, Object>> industries);
    public   Map<String, Object> buildNode(
            Map<String, Object> parent,
            Map<Object, List<Map<String, Object>>> groupedByParent
    );
}
